import os

# https://github.com/JACKYLUO1991/106-landmarks-dataset

landmark_num = 106

# PCA n_components
n_components = 12

data_path  = '../data/106p/'
model_path = 'models/'
noface_data_path = '../data/noface'

reset_idx = [2, 3, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, \
            14, 15, 16, 17, 0, 1, 48, 49, 46, 47, 44, 45, 42, 43, 40, 41, 38, 39, 36, 37, 64, 65, 62, 63, 60, 61, 58, \
            59, 56, 57, 54, 55, 52, 53, 50, 51, 34, 35, 70, 71, 82, 83, 80, 81, 84, 85, 78, 79, 74, 75, 66, 67, 72, \
            73, 68, 69, 76, 77, 86, 87, 96, 97, 98, 99, 102, 103, 100, 101, 92, 93, 94, 95, 90, 91, 88, 89, 186, 187, \
            192, 193, 188, 189, 190, 191, 178, 179, 180, 181, 174, 175, 182, 183, 176, 177, 184, 185, 202, 203, 210, \
            211, 208, 209, 206, 207, 204, 205, 194, 195, 196, 197, 198, 199, 200, 201, 150, 151, 152, 153, 154, 155, \
            156, 157, 158, 159, 160, 161, 170, 171, 168, 169, 166, 167, 164, 165, 162, 163, 144, 145, 146, 147, 148, \
            149, 172, 173, 104, 105, 130, 131, 128, 129, 126, 127, 142, 143, 134, 135, 136, 137, 122, 123, 138, 139, \
            116, 117, 118, 119, 106, 107, 112, 113, 110, 111, 132, 133, 124, 125, 140, 141, 114, 115, 120, 121, 108, 109]

mirror_idx = [  32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, \
                5, 4, 3, 2, 1, 0, 52, 53, 54, 55, 56, 57, 58, 59, 61, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 33, 34, 35, \
                36, 37, 38, 39, 40, 42, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, \
                71, 82, 83, 84, 85, 93, 94, 92, 91, 90, 89, 88, 86, 87, 99, 98, 97, 96, 95, 102, 101, 100, 105, 104, 103]

mtcnn_idx  = [42, 60, 85, 86, 93]


######################## step1 ########################
step1_idx = [9, 23, 42, 60, 85, 87, 94]     # 7P
step1_m = (0.2, 20, 0.3)
step1_t = 3
step1_proposal = [0, 1]
step1_scale = 1.5
step1_resize = 80
step1_crop_size = 12


######################## step2 ########################
# 41P
step2_idx = [1, 3, 5, 8, 11, 14, 16, 18, 21, 24, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 48, 52, 54, 56, 58, 60, 62, 64, 67, 72, 76, 80, 84, 87, 89, 91, 94, 96, 98, 101, 104]
step2_m = (0.1, 15, 0.15)
step2_t = 2
step2_proposal = [12]
class_weight = 10.0

# 0
# step2_scale = 1.5
# step2_resize = 120
# step2_crop_size = 10

# 1
step2_scale = 1.2
step2_resize = 160
step2_crop_size = 10

# 2
# step2_scale = 1.2
# step2_resize = 160
# step2_crop_size = 12


######################## train ########################
active_step = 2
log_interval = 100
no_cuda = True
seed = 1234
batch_size = 256
# optimizer = 'sgd'
optimizer = 'adam'
learning_rate = 0.001
lr_step = 3
lr_gamma = 0.1
momentum = 0.8
epochs = 9


#######################################################
scale  = step1_scale if active_step == 1 else step2_scale
resize = step1_resize if active_step == 1 else step2_resize
crop_size  = step1_crop_size if active_step == 1 else step2_crop_size
sample_idx = step1_idx if active_step == 1 else step2_idx
